<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\bootstrap\ActiveForm;

$this->title = 'create';
?>
<link href="plugins/scs.min.css" rel="stylesheet" />
<link href="plugins/time.css" rel="stylesheet" />
<style>
  .add_staff .staffsex_box{overflow:hidden;}
  .add_staff .staffsex_box>span{float:left;margin-top:10px;font-weight:700;}
  .add_staff .staffsex_box .radio{float:left;margin-left:50px;}
  .add_staff .box-footer{text-align:center;}
  .add_staff .box-footer button{width:200px;}
  #datetitle{width:100%;height:50px;}
  #datetitle h1{line-height:50px;}
  .cascade_scroll_selects .scs_container .scs_dialog{position:fixed;width:50%;}
</style>
<section class="content-header">
  <ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
    <li class="active">录入用户</li>
  </ol>
</section>

<!-- Main content -->
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box-header"><h2 class="box-title"><?php if ($model->id) {?>修改用户<?php } else{ ?>新建用户<?php }?></h2></div>
      <div class="box-body add_staff">
        <?php $form = ActiveForm::begin(['action' => ['order/create', 'id' => $model->id], 'method' => 'post']);?>
          <div class="box-body">
            <div class="form-group">
              <label for="staff_uname">barcode</label>
              <?=Html::textInput('barcode', $model->barcode, ['class' => 'form-control', "id" => "staff_uname"]);?>
            </div>
            <div class="form-group">
              <label for="staff_uname">姓名</label>
              <?=Html::textInput('name', $model->name, ['class' => 'form-control', "id" => "staff_uname"]);?>
            </div>
            <div class="form-group staffsex_box">
              <span>性别</span>
              <div class="radio">
                <label><?=Html::radioList('gender', $model->gender,['M'=>'男','F'=>'女'],['class'=>'form-control']);?></label>
              </div>
            </div>
            <div class="form-group">
              <label for="staff_phone">电话</label>
              <?=Html::textInput('mobileNumber', $model->mobileNumber,['class' => 'form-control', "id" => "staff_phone"]);?>
            </div>
            <div class="form-group">
              <label>检测时间:</label>
              <div class="input-group date">
                <div class="input-group-addon">
                  <i class="fa fa-calendar"></i>
                </div>
                <?=Html::textInput('samplingDate', date('Y-m-d', $model->samplingDate), ['class' => 'form-control pull-right', 'id' => 'datepicker', 'readonly' => true]);?>
              </div>
              <!-- /.input group -->
            </div>
          </div>
          <div class="box-footer">
            <button type="submit" class="btn btn-primary">确定</button>
          </div>
        <?php ActiveForm::end();?>
      </div>
    </div>
  </div>
</section>
<div id="datePlugin"></div>

<script src="js/jquery.js"></script>
<script type="text/javascript" src="plugins/date.js" ></script>
<script type="text/javascript" src="plugins/iscroll.js" ></script>
<script src="plugins/jquery.scs.min.js"></script>
<script src="plugins/CNAddrArr.min.js"></script>
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>

<script>
  $('#datepicker').datepicker({
    autoclose: true
  });
</script>